<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <title></title>
    </h:head>
    <h:body>
        <h:form>


            <!--o dataTable percorre uma lista (controleTabela.lista) e os valores de cada iteração dessa lista 
             (cada objeto,cada linha) e armazenado em uma variável (obj)   -->
            <h:dataTable value="#{controleTabela.lista}" var="obj" >
                <h:column > 
                    <f:facet name="header">
                        <h:outputText value="Código"/>
                    </f:facet>
                    <h:outputText  value="#{obj.id} "/>
                </h:column>
                <h:column>
                    
                <f:facet name="header">
                    <h:outputText value="Nome" />
                </f:facet>
                    <h:outputText value="#{obj.nome}"/>
                </h:column>
                <h:column>
                    <f:facet name="header" >
                        <h:outputText value="Telefone"/>
                    </f:facet>
                    <h:outputText value="#{obj.telefone}" />
                </h:column>

            </h:dataTable>
        </h:form>  

    </h:body>
</html>

